﻿using System;
using SharpSqlAnalyzer.nodes;
using SharpSqlAnalyzer.nodes.hive;

namespace SharpSqlAnalyzer.stmt.hive
{
	// Token: 0x020001C1 RID: 449
	public class THiveImportTable : TCustomSqlStatement
	{
		// Token: 0x06000EF3 RID: 3827 RVA: 0x0030ADD8 File Offset: 0x00308FD8
		public THiveImportTable(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.ssthiveImportTable;
		}

		// Token: 0x170002BD RID: 701
		// (get) Token: 0x06000EF4 RID: 3828 RVA: 0x0030ADEC File Offset: 0x00308FEC
		// (set) Token: 0x06000EF5 RID: 3829 RVA: 0x0030ADF4 File Offset: 0x00308FF4
		public virtual bool External
		{
			get
			{
				return this.external;
			}
			set
			{
				this.external = value;
			}
		}

		// Token: 0x170002BE RID: 702
		// (get) Token: 0x06000EF6 RID: 3830 RVA: 0x0030ADFD File Offset: 0x00308FFD
		// (set) Token: 0x06000EF7 RID: 3831 RVA: 0x0030AE05 File Offset: 0x00309005
		public virtual TObjectName Path
		{
			get
			{
				return this.path;
			}
			set
			{
				this.path = value;
			}
		}

		// Token: 0x170002BF RID: 703
		// (get) Token: 0x06000EF8 RID: 3832 RVA: 0x0030AE0E File Offset: 0x0030900E
		// (set) Token: 0x06000EF9 RID: 3833 RVA: 0x0030AE16 File Offset: 0x00309016
		public virtual TTable Table
		{
			get
			{
				return this.table;
			}
			set
			{
				this.table = value;
			}
		}

		// Token: 0x170002C0 RID: 704
		// (get) Token: 0x06000EFA RID: 3834 RVA: 0x0030AE1F File Offset: 0x0030901F
		// (set) Token: 0x06000EFB RID: 3835 RVA: 0x0030AE27 File Offset: 0x00309027
		public virtual TObjectName TableLocation
		{
			get
			{
				return this.tableLocation;
			}
			set
			{
				this.tableLocation = value;
			}
		}

		// Token: 0x06000EFC RID: 3836 RVA: 0x0030AE30 File Offset: 0x00309030
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			base.doParseStatement(psql);
			THiveImportSqlNode thiveImportSqlNode = (THiveImportSqlNode)this.rootNode;
			this.external = thiveImportSqlNode.External;
			this.path = thiveImportSqlNode.Path;
			this.tableLocation = thiveImportSqlNode.TableLocation;
			if (thiveImportSqlNode.FromTable != null)
			{
				this.table = this.analyzeFromTable(thiveImportSqlNode.FromTable, new bool?(true));
			}
			return 0;
		}

		// Token: 0x06000EFD RID: 3837 RVA: 0x0030AEA0 File Offset: 0x003090A0
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000EFE RID: 3838 RVA: 0x0030AEB0 File Offset: 0x003090B0
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x0400134F RID: 4943
		private bool external;

		// Token: 0x04001350 RID: 4944
		private TTable table;

		// Token: 0x04001351 RID: 4945
		private TObjectName path;

		// Token: 0x04001352 RID: 4946
		private TObjectName tableLocation;
	}
}
